<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<form id="pagerForm" method="get" model="viewRequest" action="#rel#">
	<input type="hidden" name="viewRequest.page" value="${page.number}" />
	<input type="hidden" name="viewRequest.size" value="${page.size}" />
	<c:forEach items="${viewRequest.params}" var="params">
		<input type="hidden" id="${params.key}" name="viewRequest.params['${params.key}']" value="${params.value}" />
	</c:forEach>
	<c:forEach items="${viewRequest.sort}" var="sort">
		<input type="hidden" name="viewRequest.sort.${sort.key}" value="${sort.value}" />
	</c:forEach>
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this,'member');" action="${rootUrl}/member/member" method="get">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>登录名：</label>
				<input type="text" name="viewRequest.params['_and_loginname_like']" value="${viewRequest.params['_and_loginname_like'] }"/>
			</li>
			<li>
				<label>名字或昵称：</label>
				<input type="text" name="viewRequest.params['_and_name_like']" value="${viewRequest.params['_and_name_like']}"/>
			</li>
			<li>
				<label>真实姓名：</label>
				<input type="text" name="viewRequest.params['_and_truename_like']" value="${viewRequest.params['_and_truename_like']}"/>
			</li>
			<li>
				<label>手机号码：</label>
				<input type="text" name="viewRequest.params['_and_mobile_like']" value="${viewRequest.params['_and_mobile_like']}"/>
			</li>
		</ul>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<%-- <div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${rootUrl}/system/role/new" target="dialog" width="860" height="460" rel="role_new" title="添加"><span>添加</span></a></li>
			<li class="line">line</li>
		</ul>
	</div> --%>
	<table class="table" targetType="dialog"  width="100%" layoutH="110">
		<thead>
			<tr>
				<th width="30" align="center" >序号</th>
				<th width="200" >登陆名</th>
				<th width="200" >名字或者昵称</th>
				<th width="200" >真实姓名</th>
				<th width="200" >手机号码</th>
				<th width="100" >用户状态</th>
				<th width="100" >钱包余额</th>
				<th width="100" >分佣金额</th>
				<th width="100" >积分</th>
				<th >操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.content}" var="m" varStatus="status">
			<tr target="data_id" rel="${role.id}">
				<td>${status.count}</td>
				<td>${m.loginname}</td>
				<td>${m.name}</td>
				<td>${m.truename}</td>
				<td>${m.mobile}</td>
				<td><c:if test="${m.state == 1}">已激活
					</c:if>
						<c:if test="${m.state == 0}">未激活
						</c:if>
								<c:if test="${empty m.state}">xxxxx
								</c:if>
				</td>
				<td class="listMoneyField"><fmt:formatNumber value="${m.account.purse/100}" pattern="0.00"/></td>
				<td class="listMoneyField"><fmt:formatNumber value="${m.account.commissions/100}" pattern="0.00"/></td>
				<td>${m.account.points}</td>
				<td>
				 <a title="会员查看/编辑" target="dialog" width="800" height="600" rel="group_show" href="${rootUrl}/member/member/${m.id}/edit" >查看/编辑</a>
				 <a title="查看地址" target="dialog" width="1000" height="600" rel="member_address" href="${rootUrl}/member/member-address?memberId=${m.id}" >查看地址</a>
				 <a title="银行卡号" target="dialog" width="1000" height="600" rel="member_bankcard" href="${rootUrl}/member/bankcard?memberId=${m.id}" >银行卡号</a>
				 <a title="资金流水" target="dialog" width="1000" height="600" rel="member_fundFlow_dialog" href="${rootUrl}/member/fund-flow/${m.id}" >资金流水</a>
				 <a title="评论表" target="dialog" width="1000" height="600" rel="member_comments" href="${rootUrl}/order/comments/0/search?memberId=${m.id}" >评论表</a>
				 <a title="订单表" target="dialog" width="1600" height="600" rel="member_orders" href="${rootUrl}/order/orders/0/search?memberId=${m.id}" >订单表</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="${page.size}">${page.size}</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共${page.totalElements}条 </span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${page.totalElements}" numPerPage="${page.size}" pageNumShown="10" currentPage="${page.number}"></div>
	</div>
</div>